<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./src/vue.js"></script>

</head>
<body>



<div id="app">
   <input type="text" v-model="title">
   <input type="button" value="发送" v-on:click="send">
    {{title}}
    <ul>

        <li v-for="item in list"> {{item.title}} </li>
    </ul>

</div>


<script>

    let  list = [

    ];
    new Vue({
        el: '#app',
        data:{
            list:list,
            title:''
        },
        methods:{
            send:function(){
                console.log(this.title);
                list.push({
                    id:Date.now(),
                    title:this.title
                });
                this.title='';


            }
        }

    })

</script>


</body>
</html>